<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  <title>Ionic2配置过程 | It is Home</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="#Ionic2配置过程
今天 在用ionic2 构建项目时遇到的坑
国内 环境 ionic 下载东西很慢 主要是两个 ：一是gradle-2.14.1-all.zip ；二是 pom文件 
针对第一个 要手动下载gradle文件，然后更改  项目文件夹\platforms\android\cordova\lib\builders下的GradleBuilder.js文件中的 var distribu">
<meta property="og:type" content="article">
<meta property="og:title" content="Ionic2配置过程">
<meta property="og:url" content="http://tanhanjay.oschina.io/2017/01/24/Ionic2配置过程/index.html">
<meta property="og:site_name" content="It is Home">
<meta property="og:description" content="#Ionic2配置过程
今天 在用ionic2 构建项目时遇到的坑
国内 环境 ionic 下载东西很慢 主要是两个 ：一是gradle-2.14.1-all.zip ；二是 pom文件 
针对第一个 要手动下载gradle文件，然后更改  项目文件夹\platforms\android\cordova\lib\builders下的GradleBuilder.js文件中的 var distribu">
<meta property="og:updated_time" content="2017-02-02T03:01:49.278Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Ionic2配置过程">
<meta name="twitter:description" content="#Ionic2配置过程
今天 在用ionic2 构建项目时遇到的坑
国内 环境 ionic 下载东西很慢 主要是两个 ：一是gradle-2.14.1-all.zip ；二是 pom文件 
针对第一个 要手动下载gradle文件，然后更改  项目文件夹\platforms\android\cordova\lib\builders下的GradleBuilder.js文件中的 var distribu">
  
    <link rel="alternate" href="/atom.xml" title="It is Home" type="application/atom+xml">
  
  
    <link rel="icon" href="/favicon.png">
  
  
    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  
  <link rel="stylesheet" href="/css/style.css">
  

</head>

<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/" id="logo">It is Home</a>
      </h1>
      
        <h2 id="subtitle-wrap">
          <a href="/" id="subtitle">Welcome to my blog!</a>
        </h2>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"></a>
        
          <a class="main-nav-link" href="/">Home</a>
        
          <a class="main-nav-link" href="/archives">Archives</a>
        
      </nav>
      <nav id="sub-nav">
        
          <a id="nav-rss-link" class="nav-icon" href="/atom.xml" title="RSS Feed"></a>
        
        <a id="nav-search-btn" class="nav-icon" title="搜索"></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" results="0" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="sitesearch" value="http://tanhanjay.oschina.io"></form>
      </div>
    </div>
  </div>
</header>
      <div class="outer">
        <section id="main"><article id="post-Ionic2配置过程" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2017/01/24/Ionic2配置过程/" class="article-date">
  <time datetime="2017-01-24T11:15:30.000Z" itemprop="datePublished">2017-01-24</time>
</a>
    
  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 class="article-title" itemprop="name">
      Ionic2配置过程
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <p>#Ionic2配置过程</p>
<p>今天 在用ionic2 构建项目时遇到的坑</p>
<p>国内 环境 ionic 下载东西很慢 主要是两个 ：一是gradle-2.14.1-all.zip ；二是 pom文件 </p>
<p>针对第一个 要手动下载gradle文件，然后更改  项目文件夹\platforms\android\cordova\lib\builders下的GradleBuilder.js文件中的 var distributionUrl = process.env[‘CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL’] || ‘<a href="http://192.168.0.101/gradle-2.14.1-all.zip" target="_blank" rel="external">http://192.168.0.101/gradle-2.14.1-all.zip</a>‘;</p>
<p>更改”||” 后面的地址，（自己搭建一个本地http文件服务器的地址，我用的是hfs）</p>
<p>针对第二个 将maven库改为国内的maven库的地址，方法如下：</p>
<p>在./platforms/android/build.gradle文件中</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">mavenCentral()     改为</div><div class="line">maven &#123; url &quot;http://maven.aliyun.com/nexus/content/groups/public&quot; &#125;</div></pre></td></tr></table></figure>
      
    </div>
    <footer class="article-footer">
      <a data-url="http://tanhanjay.oschina.io/2017/01/24/Ionic2配置过程/" data-id="cj26ay9lj0002mwxa481la31v" class="article-share-link">Share</a>
      
      
    </footer>
  </div>
  
    
<nav id="article-nav">
  
    <a href="/2017/01/26/sublimetext开发技巧/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Newer</strong>
      <div class="article-nav-title">
        
          sublimetext开发技巧
        
      </div>
    </a>
  
  
    <a href="/2017/01/24/前端实用工具/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Older</strong>
      <div class="article-nav-title">前端实用工具</div>
    </a>
  
</nav>

  
</article>

</section>
        
          <aside id="sidebar">
  
    
  <div class="widget-wrap">
    <h3 class="widget-title">分类</h3>
    <div class="widget">
      <ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/categories/开发/">开发</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/考研/">考研</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">标签</h3>
    <div class="widget">
      <ul class="tag-list"><li class="tag-list-item"><a class="tag-list-link" href="/tags/考研/">考研</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">标签云</h3>
    <div class="widget tagcloud">
      <a href="/tags/考研/" style="font-size: 10px;">考研</a>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">归档</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/03/">三月 2017</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/02/">二月 2017</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/01/">一月 2017</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">最新文章</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/2017/03/31/angular学习笔记/">angular学习笔记</a>
          </li>
        
          <li>
            <a href="/2017/02/02/SublimeText的常用插件及问题/">SublimeText的常用插件及问题</a>
          </li>
        
          <li>
            <a href="/2017/02/01/中南OJ题记录/">中南OJ题记录</a>
          </li>
        
          <li>
            <a href="/2017/01/26/sublimetext开发技巧/">sublimetext开发技巧</a>
          </li>
        
          <li>
            <a href="/2017/01/24/Ionic2配置过程/">Ionic2配置过程</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
        
      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      &copy; 2017 tanhanjay<br>
      Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>
    </div>
    <nav id="mobile-nav">
  
    <a href="/" class="mobile-nav-link">Home</a>
  
    <a href="/archives" class="mobile-nav-link">Archives</a>
  
</nav>
    

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>


  <link rel="stylesheet" href="/fancybox/jquery.fancybox.css">
  <script src="/fancybox/jquery.fancybox.pack.js"></script>


<script src="/js/script.js"></script>

  </div>
</body>
</html>